package com.bristua.barcode.customer.controller;

import com.bristua.barcode.common.bean.Result;
import com.bristua.barcode.common.util.HandleResultUtil;
import com.bristua.barcode.customer.biz.AddCustomerBiz;
import com.bristua.barcode.customer.model.condition.AddCustomerParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/8/6 0006.
 */
@RestController
public class AddCustomerController {

    @Autowired
    private AddCustomerBiz addCustomerBiz;
    @PostMapping(value = "/customer/add")
    public Result addCustomer(@RequestBody AddCustomerParams addCustomerParams){
        addCustomerBiz.addCustomer(addCustomerParams.getCustomerNo(),addCustomerParams.getCustomerName());
        return HandleResultUtil.addSuccessResult();
    }
}
